
from common.enum.error import ErrorEnum


DELETE_REPOSITORY_NO_PERMISSION_ERROR = ErrorEnum(
    code=400,
    msg='用户没有删除该知识库的权限'
)

REPOSITORY_NOT_EXISTS_ERROR = ErrorEnum(
    code=400,
    msg='知识库不存在'
)

USER_NOT_REPOSITORY_COLLABORATOR_ERROR = ErrorEnum(
    code=400,
    msg='用户非此仓库协作者'
)

CREATE_BOOK_ERROR = ErrorEnum(
    code=400,
    msg='创建文档失败，请检查参数'
)

REPOSITORY_NO_READ_PERMISSION_ERROR = ErrorEnum(
    code=404,
    msg='用户没有该知识库的读权限'
)

REPOSITORY_NO_WRITE_PERMISSION_ERROR = ErrorEnum(
    code=404,
    msg='用户没有该知识库的写权限'
)

BOOK_NOT_EXISTS_ERROR = ErrorEnum(
    code=400,
    msg='文档不存在'
)

BOOK_UPDATE_ERROR = ErrorEnum(
    code=500,
    msg='文档更新失败'
)

CANT_OPERATE_COLLABORATOR_ERROR = ErrorEnum(
    code=400,
    msg='没有操作协作者的权限'
)